#include <QCoreApplication>
#include <QEventLoop>
#include "IMonitor.h"
#include "DeepinMonitor.h"

IMonitor::IMonitor(QObject *parent) : QObject(parent)
{

}

QString IMonitor::screenShotSync()
{
    QEventLoop loop;
    QString result;
    connect(this, &IMonitor::screenShotDone, this, [&](QString path){
        result = path;
        loop.quit();
    });
    screenShot();
    loop.exec();
    return result;
}
